package com

import scala.concurrent.duration._

import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._

object Login {


	val headers_0 = Map(
		"Accept" -> "application/json, text/plain, */*",
		"Content-Type" -> "application/json;charset=utf-8",
		"api-version" -> "5.0",
		"opType" -> "0")

	val headers_1 = Map(
		"Accept" -> "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
		"Upgrade-Insecure-Requests" -> "1")

	val headers_4 = Map("Pragma" -> "no-cache")

    val uri2 = "http://detectportal.firefox.com/success.txt"

	val login = exec(http("request_0")
			.post("/api/user/login?_=1519974281986")
			.headers(headers_0)
			.body(RawFileBody("login_0000_request.txt"))
			.resources(http("request_1")
			.get("/")
			.headers(headers_1),
            http("request_2")
			.get("/web_upload/images/thumbnail/19E4D4C85E35786F09E2F8BD9B78007825946AE1423E1791.png")
			.check(status.is(404)),
            http("request_3")
			.get("/web_upload/images/thumbnail/A9BA2D742689E2AA1E008A264E9F14F6.jpg")
			.check(status.is(404)),
            http("request_4")
			.get(uri2 + "")
			.headers(headers_4)))

}